package br.com.rglariguet.pioneer.enums;

public enum TipoUsuarioEnum {
	ASC(1, "assistencia.tecnica", "ROLE_ASC"),
	OEM(2, "concessionaria", "ROLE_OEM"),
	ADMIN(3, "administrador", "ROLE_ADM");
	
	private int id;
	private String descricao;
	private String role;
	
	private TipoUsuarioEnum(int id, String descricao, String role) {
		this.id = id;
		this.descricao = descricao;
		this.role = role;
	}

	public String getDescricao() {
		return descricao;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}
	
	
	
	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public static TipoUsuarioEnum getStatusById(long id) {
		for (TipoUsuarioEnum status : TipoUsuarioEnum.values()) {
			if (status.getId() == id) {
				return status;
			}
		}
		return null;
	}

}
